home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / VT100.ZIP / vt100.txt
Text File  |  1995-03-14  |  9KB  |  200 lines

  1. #
  2. #                        VT100 Escape Codes
  3. #        symbology:
  4. #        ^[       = escape character (ascii 27 decimal)
  5. #        <v>         = single or double digit number.  Vertical coordinate
  6. #        <h>         = single or double digit number.  Horizontal coordinate
  7. #        <n>         = single or double digit number.  Number of chars/lines
  8. #        others   = single characters just as they appear.
  9. #
  10. # NOTE: Many sequences have "^[[" which is two chars: "escape" and "[".
  11. #
  12.  
  13. Name                  Description                            Esc Code
  14. --------------------  -------------------------------------  -----------
  15. setnl LMN             Set new line mode                      ^[[20h
  16. setappl DECCKM        Set cursor key to application          ^[[?1h
  17. setansi DECANM        Set ANSI (versus VT52)                 none
  18. setcol DECCOLM        Set number of columns to 132           ^[[?3h
  19. setsmooth DECSCLM     Set smooth scrolling                   ^[[?4h
  20. setrevscrn DECSCNM    Set reverse video on screen            ^[[?5h
  21. setorgrel DECOM       Set origin to relative                 ^[[?6h
  22. setwrap DECAWM        Set auto-wrap mode                     ^[[?7h
  23. setrep DECARM         Set auto-repeat mode                   ^[[?8h
  24. setinter DECINLM      Set interlacing mode                   ^[[?9h
  25.  
  26. setlf LMN             Set line feed mode                     ^[[20l
  27. setcursor DECCKM      Set cursor key to cursor               ^[[?1l
  28. setvt52 DECANM        Set VT52 (versus ANSI)                 ^[[?2l
  29. resetcol DECCOLM      Set number of columns to 80            ^[[?3l
  30. setjump DECSCLM       Set jump scrolling                     ^[[?4l
  31. setnormscrn DECSCNM   Set normal video on screen             ^[[?5l
  32. setorgabs DECOM       Set origin to absolute                 ^[[?6l
  33. resetwrap DECAWM      Reset auto-wrap mode                   ^[[?7l
  34. resetrep DECARM       Reset auto-repeat mode                 ^[[?8l
  35. resetinter DECINLM    Reset interlacing mode                 ^[[?9l
  36.  
  37. altkeypad DECKPAM     Set alternate keypad mode              ^[=
  38. numkeypad DECKPNM     Set numeric keypad mode                ^[>
  39.  
  40. setukg0               Set United Kingdom G0 character set    ^[(A
  41. setukg1               Set United Kingdom G1 character set    ^[)A
  42. setusg0               Set United States G0 character set     ^[(B
  43. setusg1               Set United States G1 character set     ^[)B
  44. setspecg0             Set G0 special chars. & line set       ^[(0
  45. setspecg1             Set G1 special chars. & line set       ^[)0
  46. setaltg0              Set G0 alternate character ROM         ^[(1
  47. setaltg1              Set G1 alternate character ROM         ^[)1
  48. setaltspecg0          Set G0 alt char ROM and spec. graphics ^[(2
  49. setaltspecg1          Set G1 alt char ROM and spec. graphics ^[)2
  50.  
  51. setss2 SS2            Set single shift 2                     ^[N
  52. setss3 SS3            Set single shift 3                     ^[O
  53.  
  54. modesoff SGR0         Turn off character attributes          ^[[m
  55. modesoff SGR0         Turn off character attributes          ^[[0m
  56. bold SGR1             Turn bold mode on                      ^[[1m
  57. lowint SGR2           Turn low intensity mode on             ^[[2m
  58. underline SGR4        Turn underline mode on                 ^[[4m
  59. blink SGR5            Turn blinking mode on                  ^[[5m
  60. reverse SGR7          Turn reverse video on                  ^[[7m
  61. invisible SGR8        Turn invisible text mode on            ^[[8m
  62.  
  63. setwin DECSTBM        Set top and bottom line#s of a window  ^[[<v>;<v>r
  64.  
  65. cursorup(n) CUU       Move cursor up n lines                 ^[[<n>A
  66. cursordn(n) CUD       Move cursor down n lines               ^[[<n>B
  67. cursorrt(n) CUF       Move cursor right n lines              ^[[<n>C
  68. cursorlf(n) CUB       Move cursor left n lines               ^[[<n>D
  69. cursorhome            Move cursor to upper left corner       ^[[H
  70. cursorhome            Move cursor to upper left corner       ^[[;H
  71. cursorpos(v,h) CUP    Move cursor to screen location v,h     ^[[<v>;<h>H
  72. hvhome                Move cursor to upper left corner       ^[[f
  73. hvhome                Move cursor to upper left corner       ^[[;f
  74. hvpos(v,h) CUP        Move cursor to screen location v,h     ^[[<v>;<h>f
  75. index IND             Move/scroll window up one line         ^[D
  76. revindex RI           Move/scroll window down one line       ^[M
  77. nextline NEL          Move to next line                      ^[E
  78. savecursor DECSC      Save cursor position and attributes    ^[7
  79. restorecursor DECSC   Restore cursor position and attributes ^[8
  80.  
  81. tabset HTS            Set a tab at the current column        ^[H
  82. tabclr TBC            Clear a tab at the current column      ^[[g
  83. tabclr TBC            Clear a tab at the current column      ^[[0g
  84. tabclrall TBC         Clear all tabs                         ^[[3g
  85.  
  86. dhtop DECDHL          Double-height letters, top half        ^[#3
  87. dhbot DECDHL          Double-height letters, bottom half     ^[#4
  88. swsh DECSWL           Single width, single height letters    ^[#5
  89. dwsh DECDWL           Double width, single height letters    ^[#6
  90.  
  91. cleareol EL0          Clear line from cursor right           ^[[K
  92. cleareol EL0          Clear line from cursor right           ^[[0K
  93. clearbol EL1          Clear line from cursor left            ^[[1K
  94. clearline EL2         Clear entire line                      ^[[2K
  95.  
  96. cleareos ED0          Clear screen from cursor down          ^[[J
  97. cleareos ED0          Clear screen from cursor down          ^[[0J
  98. clearbos ED1          Clear screen from cursor up            ^[[1J
  99. clearscreen ED2       Clear entire screen                    ^[[2J
  100.  
  101. devstat DSR           Device status report                   ^[5n
  102. termok DSR               Response: terminal is OK            ^[0n
  103. termnok DSR              Response: terminal is not OK        ^[3n
  104.  
  105. getcursor DSR         Get cursor position                    ^[6n
  106. cursorpos CPR            Response: cursor is at v,h          ^[<v>;<h>R
  107.  
  108. ident DA              Identify what terminal type            ^[[c
  109. ident DA              Identify what terminal type (another)  ^[[0c
  110. gettype DA               Response: terminal type code n      ^[[?1;<n>0c
  111.  
  112. reset RIS             Reset terminal to initial state        ^[c
  113.  
  114. align DECALN          Screen alignment display               ^[#8
  115. testpu DECTST         Confidence power up test               ^[[2;1y
  116. testlb DECTST         Confidence loopback test               ^[[2;2y
  117. testpurep DECTST      Repeat power up test                   ^[[2;9y
  118. testlbrep DECTST      Repeat loopback test                   ^[[2;10y
  119.  
  120. ledsoff DECLL0        Turn off all four leds                 ^[[0q
  121. led1 DECLL1           Turn on LED #1                         ^[[1q
  122. led2 DECLL2           Turn on LED #2                         ^[[2q
  123. led3 DECLL3           Turn on LED #3                         ^[[3q
  124. led4 DECLL4           Turn on LED #4                         ^[[4q
  125.  
  126. #
  127. #  All codes below are for use in VT52 compatibility mode.
  128. #
  129.  
  130. setansi               Enter/exit ANSI mode (VT52)            ^[<
  131.  
  132. altkeypad             Enter alternate keypad mode            ^[=
  133. numkeypad             Exit alternate keypad mode             ^[>
  134.  
  135. setgr                 Use special graphics character set     ^[F
  136. resetgr               Use normal US/UK character set         ^[G
  137.  
  138. cursorup              Move cursor up one line                ^[A
  139. cursordn              Move cursor down one line              ^[B
  140. cursorrt              Move cursor right one char             ^[C
  141. cursorlf              Move cursor left one char              ^[D
  142. cursorhome            Move cursor to upper left corner       ^[H
  143. cursorpos(v,h)        Move cursor to v,h location            ^[<v><h>
  144. revindex              Generate a reverse line-feed           ^[I
  145.  
  146. cleareol              Erase to end of current line           ^[K
  147. cleareos              Erase to end of screen                 ^[J
  148.  
  149. ident                 Identify what the terminal is          ^[Z
  150. identresp             Correct response to ident              ^[/Z
  151.  
  152. #=======================================================================
  153.  
  154. #
  155. # VT100 Special Key Codes
  156. #
  157. # These are sent from the terminal back to the computer when the
  158. # particular key is pressed.  Note that the numeric keypad keys
  159. # send different codes in numeric mode than in alternate mode.
  160. # See escape codes above to change keypad mode.
  161. #
  162.  
  163. # Function Keys:
  164.  
  165. PF1                ^[OP
  166. PF2                ^[OQ
  167. PF3                ^[OR
  168. PF4                ^[OS
  169.  
  170.  
  171. # Arrow Keys:
  172.                 Reset         Set
  173.                 -----         ---
  174. up               ^[A         ^[OA
  175. down             ^[B         ^[OB
  176. right            ^[C         ^[OC
  177. left             ^[D         ^[OD
  178.  
  179.  
  180. # Numeric Keypad Keys:
  181.  
  182.                 Keypad Mode
  183.                 -----------------
  184. Keypad Key        Numeric        Alternate
  185. ----------        -------        ---------
  186. 0                0        ^[Op
  187. 1                1        ^[Oq
  188. 2                2        ^[Or
  189. 3                3        ^[Os
  190. 4                4        ^[Ot
  191. 5                5        ^[Ou
  192. 6                6        ^[Ov
  193. 7                7        ^[Ow
  194. 8                8        ^[Ox
  195. 9                9        ^[Oy
  196. - (minus)        -        ^[Om
  197. , (comma)        ,        ^[Ol
  198. . (period)       .        ^[On
  199. ENTER           ^M        ^[OM
  200.